
	<form class="layui-form" id="editPointForm" action="">
		<div class="layui-form-item">
		    <label class="layui-form-label">当前积分:</label>
		    <div class="layui-input-block">
		     <input value=" ${member.point }" lay-verify="required"  class="layui-input" type="text" disabled="disabled">
		    </div>
		  </div>
		  <div class="layui-form-item">
		    <label class="layui-form-label">调整积分（增/减）:</label>
		    <div class="layui-input-block">
		      <input name="point" id="point" lay-verify="required|point" placeholder="输入负值即可减少积分" autocomplete="off" class="layui-input" type="text" size="20" >
		    </div>
		  </div>
	   <div class="layui-form-item">
	    <div class="layui-input-block">
	      <input type="hidden" value="${memberid }" name="memberId">
	      <button class="layui-btn" lay-submit="" lay-filter="editPointBtn">立即保存</button>
	    </div>
	  </div>
	</form>

<script type="text/javascript">
	var index = parent.layer.getFrameIndex(window.name);
	
	//绑定事件
	layui.use(['form', 'layedit', 'laydate'], function(){
	    var form = layui.form()
	        ,layer = layui.layer
	        ,layedit = layui.layedit
	        ,laydate = layui.laydate;
	    
	    
	    form.verify({  
	    	 point: function(value){
	    		var reg=/^[-+]?\d*$/;
		     	if(!reg.test(value)){
					return "请输入整数";
				}
		      }
		  });   
	  
	    //保存修改
		form.on('submit(editPointBtn)', function(data){
			
			
			  
	    	var options = {
	   			url:ctx+"/shop/admin/member/edit-save-point.do",
	   			type:"post",
	   			dataType:"json",
	   			success:function(data){
	   				if(data.result==1){	
	   					$.Loading.success(data.message);
	   					parent.closeCurrent();
	   					newTab("会员列表","${ctx}/shop/admin/member/member-list.do");
	   					
	   				}if(data.result==0){
	   					$.Loading.error(data.message);
	   				}
	   			}
	   		};
	   		$("#editPointForm").ajaxSubmit(options);
	       return false;
	    });
	    

	});
</script>





